PARSER=parser
DUG=debug
HTTP_SERVER=http_server
cc=g++
CXXFLAGS=-std=c++11 -Wno-deprecated-declarations
# 添加 jsoncpp 库
LDFLAGS=-lboost_system -lboost_filesystem -ljsoncpp  -lpthread

.PHONY:all
all: $(PARSER) $(DUG) $(HTTP_SERVER)

$(PARSER): parser.cc
	$(cc) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)

$(DUG): debug.cc
	$(cc) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)

$(HTTP_SERVER): http_server.cc
	$(cc) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) 
.PHONY:clean
clean:
	rm -f $(PARSER) $(DUG) $(HTTP_SERVER)